package br.com.jdobjs.core;

import org.jboss.aop.joinpoint.MethodInvocation;

public class AfterCallRuleSecurityInterceptor extends
		AbstractRuleSecurityInterceptor {

	@Override
	public Object invoke(MethodInvocation invocation) throws Throwable {
		final Object result = invocation.invokeNext();
		if (!verifyAccess(invocation, result, InvocationStep.AfterInvocation)) {
			throw new AccessDeniedAfterInvocationException(invocation);
		}
		return result;
	}
}
